SpatialStream® Code Examples

Adding Parcel WMS Layer

Creating a Map Layer Object and adding it to the map is the SpatialStream® recommended method.
The example below shows how to construct a Map Layer Object to add a Parcel layer (WMS) to the map.
The Map Layer Object constructs the GetMap requests which retrieve the images for overlaying on the map.

GetMap

parcelLayer = new Dmp.Layer.WMSLayer("ParcelWMSLabels", "SS", {

antiAlias: true,
});
parcelLayer.addChild(
"Parcels",
"samplesite.dmp/Parcels",
"samplesite.dmp.Styles.Parcels/Default.sld.xml",
{
zIndex: 2, zoomRange: {
min: 14, max: 20
}
}
);
map.addEntity(parcelLayer);

labelLayer = new Dmp.Layer.WMSLayer("ParcelWMSLabels", "SS", {

antiAlias: true,
});
labelLayer.addChild(
"Parcels",
"samplesite.dmp/Parcels",
"samplesite.dmp.Styles.Parcels/Labels.sld.xml",
{
zIndex: 3, zoomRange: {
min: 18, max: 20
}
}
);
map.addEntity(labelLayer);


Run Sample   Back To Index